// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PicknPlaceUr5Ax12DualGrip.cs" company="Microsoft Corporation">
// The MIT License (MIT)
// 
// Copyright (c) 2014, Microsoft Corporation
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Microsoft.Robotics.Hardware
{
    using System;
    using Microsoft.Robotics.Manipulation.PicknPlace;
    using Microsoft.Robotics.Numerics;

    /// <summary>
    /// Pick and place grips for and arm / hand combination using UR5 arm and the AX12Dual gripper
    /// </summary>
    public class PicknPlaceUr5Ax12DualGrip : PicknPlaceGenericArmFingerGripper
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PicknPlaceUr5Ax12DualGrip" /> class
        /// </summary>
        public PicknPlaceUr5Ax12DualGrip() : base()
        {
            this.ArmTCPPalmOffsetInM = 0.154;
            this.PalmPlaneDefault = Vector3.Normalize(new Vector3(0, 0, 1));
            this.PalmPlaneGripAxis = Vector3.Normalize(new Vector3(10, -10, 0));
            this.SimpleGripperBoxModel = new Vector3(0.010, 0.04, 0.090);
            this.PreGripOffsetAlongGripNormalInM = 0.050;
            this.MinArmReachInMForTopDown = 0.23;
            this.MinArmReachInM = 0.23;
            this.MaxArmReachInMForTopDown = 0.92;
            this.MaxArmReachInM = 0.92;
            this.MaxArmReachXYInM = 0.87;
            this.MaxArmReachXYInMForTopDown = 0.87;
            this.MaxFullyExtendXYForTopDown = 0.87;
            this.MaxFullyExtendElevationForTopDown = 0.4;
            this.MaxYclearance = -2.0;
            this.MinZClearanceOverTable = 0.081;
            this.MinArmGripperOrientThreshold = -0.5;
            this.MaxFullyRetractedElevationWrap = 0.2;
            this.MinReachXYForWrap = 0.54;
            this.GripperRatePerM = 358;
            this.GripperOpenPercentOffset = -27.0;
            this.ArmName = "UR5";
        }
    }
}
